package hyit.app.comparator;

import hyit.app.model.CronInfo;

import java.util.Comparator;

public class CronInfoComparator implements Comparator<CronInfo> {

	@Override
	public int compare(CronInfo o1, CronInfo o2) {
		if (o1.getExecuteDate().after(o2.getExecuteDate())) {
			return -1;
		} else if (o1.getExecuteDate().before(o2.getExecuteDate())) {
			return 1;
		} else {
			return 0;
		}
	}

}
